/*            Copyright(c) 2006-2008 Dave Sexton           *
 * http://www.codeplex.com/DocProject                      *
 * http://www.codeplex.com/DocProject/Project/License.aspx *
 ***********************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.VCProjectEngine;
using VSLangProj80;

namespace DaveSexton.DocProject
{
	public class VCAnyProject : VSAnyProject
	{
		#region Public Properties
		public override string Directory
		{
			get
			{
				return project.ProjectDirectory;
			}
		}

		public override string FilePath
		{
			get
			{
				return project.ProjectFile;
			}
		}
		#endregion

		#region Private / Protected
		private readonly VCProject project;
		#endregion

		#region Constructors
		/// <summary>
		/// Constructs a new instance of the <see cref="VCAnyProject" /> class.
		/// </summary>
		internal VCAnyProject(VCProject project)
			: base((VSProject2) project)
		{
			this.project = project;
		}
		#endregion

		#region Methods
		protected override IProjectOutput CreateOutput()
		{
			return new VCProjectOutput(this);
		}

		public override void AddReference(object projectReference)
		{
			project.AddProjectReference(ProjectFactory.GetVSProject(projectReference));
		}
		#endregion
	}
}
